package com.example.servicemodule;

import android.os.Parcel;
import android.os.Parcelable;
import android.widget.RemoteViews;

public class ViewInfo implements Parcelable {
    private RemoteViews mRemoteViews;
    private String mName;

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeParcelable(this.mRemoteViews, flags);
        dest.writeString(this.mName);
    }

    public ViewInfo() {
    }

    private ViewInfo(Parcel in) {
        this.mRemoteViews = in.readParcelable(RemoteViews.class.getClassLoader());
        this.mName = in.readString();
    }

    public static final Creator<ViewInfo> CREATOR = new Creator<ViewInfo>() {
        @Override
        public ViewInfo createFromParcel(Parcel source) {
            return new ViewInfo(source);
        }

        @Override
        public ViewInfo[] newArray(int size) {
            return new ViewInfo[size];
        }
    };

    public RemoteViews getRemoteViews() {
        return mRemoteViews;
    }

    public void setRemoteViews(RemoteViews remoteViews) {
        mRemoteViews = remoteViews;
    }

    public String getName() {
        return mName;
    }

    public void setName(String name) {
        mName = name;
    }
}
